// https://developer.mozilla.org/zh-CN/docs/Web/API/Web_components/Using_custom_elements
// https://www.ruanyifeng.com/blog/2019/08/web_components.html
customElements.define('my-header', class extends HTMLElement {
  // constructor() {
  //   super();
  // }

  connectedCallback() {
    fetch('header.html')
      .then(response => response.text())
      .then(html => {
        const template = document.createElement('template');
        template.innerHTML = html;
        this.appendChild(template.content.cloneNode(true));
      });
  }
});